<?php
header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past
//include_once("../include/common.inc.php");
//include_once('../comm.php');

define('IN_ECS', true);
require('../includes/init.php');

$fmuid = isset($_SESSION['user_id'])?$_SESSION['user_id']:0;

if(isset($fmuid)){
	$sql = "SELECT * FROM `fmphoto` WHERE uid='".$fmuid."'";
	//$data1 = $dsql->fmSelect($sqla);
	$row = $GLOBALS['db']->getAll($sql);
	//iconv(iconv_get_encoding($data), 'UTF-8',$data)
	if(!$row){
		$info = "<root>".$info."</root>";
	}else{
		$info = '';
		foreach($row as $d){
			$info .= "<info>
        <name>".$d['memo']."</name>
        <urlx>".$d['url']."</urlx>
        <width>".$d['width']."</width>
        <height>".$d['height']."</height>
        <idx>".$d['id']."</idx>
        <thumb>".$d['thumb']."</thumb>
        </info>";
		}
		$info = "<root>".$info."</root>";
	}
}else{
	$info = "<root></root>";
}
echo $info;
?>